<template>
  <i :class="isFullScreen?'icon-tuichuquanping':'icon-quanping'" @click="handleScreen"></i>
</template>
<script setup>
import {computed,onMounted} from "vue"
import {fullscreenToggel, listenfullscreen} from "utils/util.js";
import {useCommonStore} from "@/store/modules/common.js";


const isFullScreen = computed(() => {
  const commonStore = useCommonStore()
  return commonStore.isFullScreen
})

onMounted(() => {
  listenfullscreen(setScreen);
})

function setScreen() {
  const commonStore = useCommonStore()
  // this.$store.commit("SET_FULLSCREN");
  commonStore.SET_FULLSCREEN();
}

function handleScreen() {
  fullscreenToggel();
}
</script>